﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcMusicStore.Models.ChangeInfomationModel>" %>
<%@ Import Namespace="LibraryMusicStore" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thay đổi thông tin
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <h2>Thay đổi thông tin</h2>
    [ <%= Html.ActionLink("Thay đổi mật khẩu", "ChangePassword")%> ]
    <%Html.EnableClientValidation(); %>
    <%= Html.ValidationSummary(true) %>
    
    <% using (Html.BeginForm()) {%>
        
        <fieldset>
            <legend>Chi tiết</legend>
           
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.fullname) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBox("fullname", ((User)ViewData["User"]).fullname )%>
                <%= Html.ValidationMessageFor(model => model.fullname) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.email) %>
            </div>
            <div class="editor-field">
                <%--<%= Html.TextBoxFor(model => model.email) %>--%>
                <%= Html.TextBox("email", ((User)ViewData["User"]).email) %>
                <%= Html.ValidationMessageFor(model => model.email) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.address) %>
            </div>
            <div class="editor-field">
                <%--<%= Html.TextBoxFor(model => model.address) %>--%>
                <%= Html.TextBox("address", ((User)ViewData["User"]).address) %>
                <%= Html.ValidationMessageFor(model => model.address) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.city) %>
            </div>
            <div class="editor-field">
                <%--<%= Html.TextBoxFor(model => model.city) %>--%>
                <%= Html.TextBox("city", ((User)ViewData["User"]).city) %>
                <%= Html.ValidationMessageFor(model => model.city) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.country) %>
            </div>
            <div class="editor-field">
                <%--<%= Html.TextBoxFor(model => model.country) %>--%>
                <%= Html.TextBox("country", ((User)ViewData["User"]).country) %>
                <%= Html.ValidationMessageFor(model => model.country) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.phone) %>
            </div>
            <div class="editor-field">
                <%--<%= Html.TextBoxFor(model => model.phone) %>--%>
                <%= Html.TextBox("phone", ((User)ViewData["User"]).phone)%>
                <%= Html.ValidationMessageFor(model => model.phone) %>
            </div>
            
            <p>
                <input type="submit" value="Lưu" />
            </p>
        </fieldset>

    <% } %>

    <%--<div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>--%>

</asp:Content>

